To do this, the best way is:
- remove the user ( rmuser <username> )
- add again the user ( mkuser )
- rename the directory to the new name.
- change the owner of the directory ( and all files and subdirectories )to the new user
Simply save their encrypted password information
lsuser current user > /tmp/file1
grep -p current user /etc/security/passwd egrep "password|lastupdate" >/tmp/file2
rmuser -p curent user
mkuser "correct arguments" new user [ user /tmp/file1 to get the arguments,changed for the new user name ]
Passwd new user [set to arbitrary]
Pwdadm -c new user [ clear change flag ]
Vi +new user: /etc/security/passwd
Delete the password and lastupdate field, then read in /tmp/file2
If the user has a crontab, you will have to move it by hand.
If the user has a mail file, you will have to move it by hand.
If the home dir is name specific, you will have to move it by hand.
You may also need to update /etc/ftpusers /etc/ftpusers.allow $cronallow
$atallow
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.