Where did "passwd" go?

Any questions about the Command Line Interface can be placed here!
Forum rules
Please note the disclaimer before modifying your Synology Product.

Where did "passwd" go?

Postby svenglar » Fri Nov 12, 2010 8:53 pm

So I've been trying to get scp working. And in doing so had to install the openssh package from ipkg.

The problem with that is that it changes the root password to "synopass".
Okay, so I figured a quick passwd command would let me change the password. But it turns out that the binary is missing.

So... I'm guessing Synology took it out in a recent patch.
My question is: How do I change the root password from the command line?

One thing of note...
With the OpenSSH package installed from IPKG the "root" and the "admin" account have been split in to 2 distinct accounts. So going to the web interface and changing the "admin" password does not work.
svenglar
I'm New!
I'm New!
 
Posts: 8
Joined: Sun Sep 26, 2010 10:44 pm

Re: Where did "passwd" go?

Postby d.tamm » Sun Nov 21, 2010 9:42 pm

Same problem here: I need the passwd command, in my case not for root but for a "normal" user which we - for compatibility reasons with other computers - created with userID 500. This user does not appear in the web interface.

So I would really appreciate a way to set passwords on the command line.

According to viewtopic.php?f=161&t=27639, even other user management commands like adduser have been removed in DSM 3.0. On a new system this might be ok, because it is preventing people to create users with non-standard ID's. But upgrading to 3.0 from a system where non-standard ID's were possible is a pain if you no longer can use these accounts.
Disk Station 209+II with DSM 3.1 and DS211 with DSM 3.2
d.tamm
Trainee
Trainee
 
Posts: 19
Joined: Thu Aug 20, 2009 6:18 pm

Re: Where did "passwd" go?

Postby Lynetk » Tue Mar 29, 2011 10:22 am

Hi.

Anyone found any solutions to this.

I installed OpenSSH because i need SCP. Afterwards root password was changed to default, and no way to change it for me.

Can anybody help me ?
Lynetk
I'm New!
I'm New!
 
Posts: 6
Joined: Fri Mar 06, 2009 10:20 am

Re: Where did "passwd" go?

Postby wildermj » Sat Apr 09, 2011 3:17 am

Its not a fix for you, but you should be able to back up /etc/shadow before installing openssh and then copy it back over, which will have your proper shadowed password.

You could also try running passwd on another linux box to set the password for a user, then copy the encrypted hash out of /etc/shadow on that box and paste it into the one on your synology box
wildermj
I'm New!
I'm New!
 
Posts: 1
Joined: Sat Apr 09, 2011 3:15 am

Re: Where did "passwd" go?

Postby iStone » Sun May 01, 2011 8:44 pm

What a complication!
seems we are really challenging sysnology -busybox.

should we skip scp?
DS211/DSM/4.1, Apache/2.2.22 (Unix) PHP/5.3.15phpMyadmin:3.5.3, asking...
- JDownloader package/plugin
- Online HDD health/alarm system
_______________________________________________________________
http://www.synology-forum.de
http://www.synology-forum.nl
iStone
Rookie
Rookie
 
Posts: 36
Joined: Sun Apr 10, 2011 7:58 am

Re: Where did "passwd" go?

Postby Lynetk » Mon Nov 21, 2011 11:23 am

I actually solved this this morning.

Found this site : http://www.marktomlinson.com/2011/08/sy ... -password/

and to write it here in case site goes offline or changes :

"
The next thing I wanted to do, obviously, was to change this default password. Normally on 'nix systems you would use the *passwd* command, but the BusyBox shell doesn't have one. A little poking around reveal the Synology way to set the password:

`synouser --setpw root `

Where `` is your preferred password: `FredQK2` for example. By the way when you log in as root for the first time the shell tries to change to your home directory and you may notice the following message:

*Could not chdir to home directory /var/services/homes/root: No such file or directory*

The problem is that root doesn't have one set by default. You will need to create one – if the message bothers you. Just type the following command at the prompt:

`mkdir /var/services/homes/root`

Otherwise it isn't important as you'll be logged in only into the / (root) directory."

Hope it helps
Lynetk
I'm New!
I'm New!
 
Posts: 6
Joined: Fri Mar 06, 2009 10:20 am


Return to Command Line Interface

Who is online

Users browsing this forum: No registered users and 0 guests