Comments on: Managing Users & Groups, File Permissions & Attributes and Enabling sudo Access on Accounts – Part 8 https://www.tecmint.com/manage-users-and-groups-in-linux/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Wed, 27 Jan 2021 14:55:06 +0000 hourly 1 By: Geoff Gates https://www.tecmint.com/manage-users-and-groups-in-linux/comment-page-1/#comment-1423446 Wed, 27 Jan 2021 14:55:06 +0000 http://www.tecmint.com/?p=9519#comment-1423446 Hi Gabriel, nice tutorial, enjoyed it. Can you clarify and state best practices, please. I have 2 directories, ACCOUNTS, and OFFICE, both set to 2770 and ACCOUNTS is owned by group “department1″, and OFFICE is owned by group ” department 2″ both groups users can only use and see their own directories.

This all works fine but a new user “JOHN” wants to be able to access and modify BOTH directories, can you tell me how to make this happen, whats best practice?

]]>
By: Ravi Saive https://www.tecmint.com/manage-users-and-groups-in-linux/comment-page-1/#comment-1294801 Mon, 25 Nov 2019 04:34:18 +0000 http://www.tecmint.com/?p=9519#comment-1294801 In reply to kiran.

@Kiran,

To delete multiple users at a time in Linux, use the following command.

# for u in user1 user2 user3 user4; do echo "$u"; userdel -r "$u"; done

Alternatively, use the following command to delete multiple system users in Linux.

# for user in `cat del.user`;do userdel $user;done

explanation of the above command.

  • user – It is the variable used to store values from del.user file.
  • del.user – It is the file with all user names that you want to delete.
  • userdel – A command used to delete the user.
  • userdel -r – This command used to delete user’s with home directory.
]]>
By: kiran https://www.tecmint.com/manage-users-and-groups-in-linux/comment-page-1/#comment-1294052 Sat, 23 Nov 2019 06:23:28 +0000 http://www.tecmint.com/?p=9519#comment-1294052 How to delete multiple users at a time?

]]>
By: Amit Kumar Rai https://www.tecmint.com/manage-users-and-groups-in-linux/comment-page-1/#comment-1043592 Fri, 05 Oct 2018 05:39:56 +0000 http://www.tecmint.com/?p=9519#comment-1043592 Nice article appreciate your work. But make one correction here for unlocking a user you have to use “usermod -U username” instead of using small “u“, use capital U. Because with small u we can assign new UID for the user. its not for Unlocking a user.

]]>
By: Akash https://www.tecmint.com/manage-users-and-groups-in-linux/comment-page-1/#comment-905389 Sat, 05 Aug 2017 07:48:00 +0000 http://www.tecmint.com/?p=9519#comment-905389 Create a bash script to perform user management tasks like creating a new group. The script must check to ensure that no duplicate group names exist on the system. If a duplicate is found, an error needs to be reported, and the administrator must try another group name.

]]>