Tag Info

Hot answers tagged

19

You have to check man passwd: If the encrypted password is set to an asterisk (*), the user will be unable to login using login(1), but may still login using rlogin(1), run existing processes and initiate new ones through rsh(1), cron(8), at(1), or mail filters, etc. Trying to lock an account by simply changing the ...


13

The accounts with passwords are the accounts with a glob of base64 gibberish in the second field: root:8sh9JBUR0VYeQ:0:0:Super-User,,,,,,,:/:/bin/ksh lp:VvHUV8idZH1uM:9:9:Print Spooler Owner:/var/spool/lp:/bin/sh This computer appears to be using the traditional, DES-based crypt(3) password hash. This hash is quite weak by modern standards; if you can't ...


8

This means that it is disabled for direct login. It is a user that is used for running services or to be used for rlogin. Check https://en.wikipedia.org/wiki/Passwd#Password_file


5

An email thread: http://www.sudo.ws/pipermail/sudo-users/2002-September/001225.html http://www.sudo.ws/pipermail/sudo-users/2002-September/001226.html .. points out that sudo -u nobody [cmd ...] can be used: (Combined with the trick of How to append to a file as sudo) echo "Hello World" | sudo -u nobody tee -a /tmp/logfile.log


4

usermod is a tool for modifying the local /etc/passwd database. It cannot be used to modify accounts delivered through Active Directory. id on the other hand looks up any user account regardless of its source. (Actually this is controlled with the passwd setting in nsswitch.conf but if you have integrated AD you'll be using multiple sources.) As mentioned ...


3

Don't try making the login name longer, you'll probably find loads of places it breaks. Note that you don't have a problem with the number of possible login names (you only get UID_MAX-UID_MIN uids anyway, which is 59,000 on my system). The problem is just with how descriptive they are, but fortunately there's another field intended to be descriptive: the ...


3

Just call useradd and pass it the arguments you want. To create a system user, passs the -r option. If you don't want a home directory, pick something like /none and pass the -M option. If you want to be able to use su to run commands as that user, the user needs to have a valid shell. useradd -r -d /none -M -U -s /bin/sh I don't recommend modifying the ...


3

Most modern Unix systems use PAM to handle authentication. The pam_unix module is the one that does password authentication against /etc/password and /etc/shadow. However, you shouldn't reinvent the wheel. Asking for the user's password and running as root is a basic configuration of sudo, the de facto standard way to elevate privileges. Note that properly ...


3

About your actual question, see taliezin's answer (and accept that one ;) About your other problem: Search for the string 8sh9JBUR0VYeQ on the disk to figure out the disk block(s) it resides in. Then dd that disk block(s) into a file, replace that string with a known password hash (the old crypt() one - same length) and write the disk block(s) back to the ...


2

The account will be setup without login possibilities as there is no valid password assigned to the account, and that is different from no password. You can check this by doing sudo grep -f system-user /etc/shadow. The second field (between the first and second colon (:)) will be a '*' and no hash of any password you can provide will match against that. ...


1

You should first initialize the passwd of your user : $passwd system-user then return two times in order to create a blank passwd. You can verify that there's no passwd in the file /etc/shadows (the second field should be empty). But yes, this account will not be protected even with no $HOME neither shell. All users with a sudo account will be able to ...


1

I found a solution to this problem: The actual user ID was stored in environment variable $ORIG_USER. This works in our environment; YMMV.



Only top voted, non community-wiki answers of a minimum length are eligible