- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Shell script qustion
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
Forums
Discussions
Discussions
Discussions
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
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
02-18-2003 09:10 AM
02-18-2003 09:10 AM
I need to add the workstation in the /etc/passwd (using the useradd command) and then I have to edit the same user.
This is what I'm talking about:
after adding the new user (workstation) I have this entry in the /etc/passwd
wsat1221:*:284:102:,,,,:/baan/bse/home/wgr:/sbin/sh
and I need to change in to these
wsat1221$:*:284:102:,,,,:/dev/null:/bin/false
Note $ in the end of the user name as well as home directory and the shell
Thank you,
Miro
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2003 09:12 AM
02-18-2003 09:12 AM
Re: Shell script qustion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2003 09:18 AM
02-18-2003 09:18 AM
Re: Shell script qustion
while IFS=: read user pw uid gid text home shell
do
[[ $user = wsat1221 ]] && user=wsat1221\$
echo "$user\$:$pw:$uid:$gid:$text:$home:$shell"
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2003 09:21 AM
02-18-2003 09:21 AM
Re: Shell script qustion
while IFS=: read user pw uid gid text home shell
do
[[ $user = wsat1221 ]] && user=wsat1221\$
echo "$user\$:$pw:$uid:$gid:$text:/dev/null:/bin/false"
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2003 09:25 AM
02-18-2003 09:25 AM
Solutionwhile IFS=: read user pw uid gid text home shell
do
if [[ $user = wsat1221 ]]; then
user=wsat1221\$
home=/dev/null
shell=/bin/false
fi
echo "$user\$:$pw:$uid:$gid:$text:$home:$shell"
done