- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: add user: change loginname, keep UID HP-UX 1...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 03:03 AM
тАО07-14-2004 03:03 AM
a female user has married and wants to get a new login-name.
1. How to create a new user with the same UID and
2. remove the old user without losing some files or
3. does a command exist (11.00,) how to change username (without creating and deleting new user).
If possible, without sam.
Thank you,
Michael
(sorry to have put the same question in a wrong forum first)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 03:10 AM
тАО07-14-2004 03:10 AM
SolutionI think all you need to do is edit the /etc/passwd file (use vipw to be safe), duplicate the existing line, change the name (and possibly the home directory name). Then get rid of the original line and use "chown -R newuser /home/username" (first renaming the /home/username if you chose to rename it in /etc/passwd).
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 03:11 AM
тАО07-14-2004 03:11 AM
Re: add user: change loginname, keep UID HP-UX 11.00
Create new user with same uid.
vipw and add user.
Delete the old user and change the ownership of files owned by old user to new user.
Option 2
vipw, rename the user.
Change the file ownership.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 03:42 AM
тАО07-14-2004 03:42 AM
Re: add user: change loginname, keep UID HP-UX 11.00
usermod -d newhomepath -m -c "newname" -l newlogin login
Automatically does the passwd entry, creates the new home directory, and copies the files from the old to the new home directory. Leaves the old home directory in place with all files, however, so that would need to be removed manually.
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 08:22 AM
тАО07-14-2004 08:22 AM
Re: add user: change loginname, keep UID HP-UX 11.00
# su - root
# usermod -l [new name] loginname
see man pages usermod - this does not update the home directory name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2004 03:02 AM
тАО08-17-2004 03:02 AM
Re: add user: change loginname, keep UID HP-UX 11.00
thank you for all your answers.
Pete: best answer
RAC: Option 1: ok, but files get new dates
Option 2: ok
Jeff: easy and fast, but files get new date (because of copying)
lawrenzo: good solution; you have to edit passwd and change homedirectory afterwards
Points to you all,
Michael