Changing the login shell for a user: Difference between revisions

From wiki
Jump to navigation Jump to search
imported>Satinz
(New page: ===Changing the login shell for a user=== If you experience an error like: <pre>su: cannot run /sbin/nologin: No such file or directory</pre> when you try to do <pre>su some_user</pre> you...)
 
imported>Johayek
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 5: Line 5:
<pre>su some_user</pre>
<pre>su some_user</pre>
you have to change the login shell for that user.
you have to change the login shell for that user.
'''Notice:''' You should be sure about using <code>vi</code> properly before doing this.
This is done with the following line:
This is done with the following line:
<pre>vi /etc/passwd</pre>
<pre>vi /etc/passwd</pre>
If you
You'll see a line like this:
<pre>some_user:x:1025:100:Descriptive text:/nonexist:/sbin/nologin</pre>
Change that line to:
<pre>some_user:x:1025:100:Descriptive text:/nonexist:/bin/ash</pre>
Save the file, and you're done.
You're now able to do
<pre>su some_user</pre>
 
[[Category:SynologyWiki]]
[[Category:ToBeExported]]

Latest revision as of 16:37, 31 January 2015

Changing the login shell for a user[edit]

If you experience an error like:

su: cannot run /sbin/nologin: No such file or directory

when you try to do

su some_user

you have to change the login shell for that user.

Notice: You should be sure about using vi properly before doing this.

This is done with the following line:

vi /etc/passwd

You'll see a line like this:

some_user:x:1025:100:Descriptive text:/nonexist:/sbin/nologin

Change that line to:

some_user:x:1025:100:Descriptive text:/nonexist:/bin/ash

Save the file, and you're done. You're now able to do

su some_user