- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: script for deleting users
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
04-10-2002 02:59 AM
04-10-2002 02:59 AM
script for deleting users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2002 03:07 AM
04-10-2002 03:07 AM
Re: script for deleting users
if you know the userids of the users to be removed , you can do it by simply using the
"userdel" command
userdel loginid
userdel -r loginid (if you want to remove the users home directory too).
You can run this through remsh :
A simple format would be:
for i in `cat hostnames`
do
remsh
if [ $? -eq 0 ]
then
echo "user $loginid removed from $host" >>logfile
else
echo " user $loginid not removed from $host. User may not be present on the system" >>faillog
fi
done
HTh
raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2002 03:12 AM
04-10-2002 03:12 AM
Re: script for deleting users
The problem is not in collecting the passwd files (as you mentioned, with ftp) or deleting the users (I would generate "userdel" scripts - and not forget to remove/move the files/directories these users had - ftp those back to the appropriate systems and execute them there, rather than start messing with the passwd files).
However, the problem is in scheduling all those things to happen sequentially spanning several different servers. For that I would use Control-M, but that's an "external" software ... I don't know if you have a "Cross Server Job Scheduler" or have to rely on good old crontab. In the latter case it's going to be tricky.
Hope this gets you started,
Tom Geudens
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2002 03:22 AM
04-10-2002 03:22 AM
Re: script for deleting users
Besides /etc/passwd and /etc/group modifications, did you also think about what to do with the /home directory of the user to be deleted..? Putting homedirecoties centralized using automounter (autofs) is an other thing to think about.
Regards,
Ceesjan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2002 03:29 AM
04-10-2002 03:29 AM
Re: script for deleting users
As already stated by Ceesjan, start investigating using NIS+ and a NFS mounted filesystem for the users home directories.
That would be the easiest way to manage user adding and deleting.
Regards,
Clemens
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2002 04:54 AM
04-10-2002 04:54 AM