I want to add the PATH of the default for the user where a shell is set in /etc/passwd by /sbin/nologin. I write PATH in /etc/csh.login or /etc/profile,csh in case of bash or csh is OK. What about /sbin/nologin?
I want to add the PATH of the default for the user where a shell is set in /etc/passwd by /sbin/nologin. I write PATH in /etc/csh.login or /etc/profile,csh in case of bash or csh is OK. What about /sbin/nologin?
If you set the shell for an account to
/sbin/nologin
(on my system it's/usr/sbin/nologin
) then if someone tries to login under that account, they will get a message that says the account is unavailable. There is no PATH or /etc/csh.login or /etc/profile for that situation.This is separate from the
/etc/nologin
file. If that file exists, no user other than root can login. The contents of that file will be displayed if they try. This is useful when the administrator is about to do a shutdown or otherwise change the runlevel of the system and doesn't want additional users logging in.Using /sbin/nologin will refuse any kind of SSH login for that user. This is useful for service accounts (i.e. apache, mysql) to prevent anyone from using them to login remotely. Typically you could also set a user to /sbin/nologin if they are just an FTP user as well.
Try changing the path in /etc/environment. Put /opt/jdk6.0/bin in front of /usr/bin. However, /usr/bin should be a symbolic link to an appropriate Java version. On Debain or Ubuntu you can use update-alternatives to modify then entry. However, in that case you should consider installing the sun-java package and not run Java from /opt.