Adding users question


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Adding users question
# 1  
Old 05-31-2009
Adding users question

Hello there,

I want to add new users to my system, so, being logged in as root I do useradd -m user_name, and the new user is added to the system. The problem is that it has more privileges than I expected. If I do su user_name then I am allowed to do cat /etc/passwd , so it is possible to see what the passwd file contains, but I don't want that to be possible. I just need to add a user with minimal privileges possible.Furthermore , how can I get the new user restricted to it's home directory, so that it wont acces other users folders and files, without modifing the permissions of the other users folders and files (that would be a major job) ?


Many thanks
# 2  
Old 05-31-2009
What OS and version are you using?
# 3  
Old 05-31-2009
Quote:
Originally Posted by help.goes.here
Hello there,

I want to add new users to my system, so, being logged in as root I do useradd -m user_name, and the new user is added to the system. The problem is that it has more privileges than I expected. If I do su user_name then I am allowed to do cat /etc/passwd , so it is possible to see what the passwd file contains, but I don't want that to be possible. I just need to add a user with minimal privileges possible.Furthermore , how can I get the new user restricted to it's home directory, so that it wont acces other users folders and files, without modifing the permissions of the other users folders and files (that would be a major job) ?


Many thanks
As far as I know all users can read /etc/passwd, but not write to it directly; a user can only wite to it indirectly using passwd, chsh, chfn. You cannot get the user restricted to his or her home directory only if it is about telnet/ssh access, but you can restrict him or her to the home directory if you mean ftp access.
# 4  
Old 05-31-2009
I am using Ubuntu 9.04 .Yes I know the user can not write to /etc/passwd but reading it is also an unwanted thing.I want that the home folder of the user to be a sort of a jailhouse. Any more opinions ?
# 5  
Old 05-31-2009
Quote:
Originally Posted by help.goes.here
I am using Ubuntu 9.04 .Yes I know the user can not write to /etc/passwd but reading it is also an unwanted thing.I want that the home folder of the user to be a sort of a jailhouse. Any more opinions ?
I know that with "jailhouse" from FTP servers, there is such a possibility, but with telnet/ssh it seems to be impossible.
If you want you can create a temp telnet/ssh account for me on your machine and we'll look together what is able to be done on your machine. I use Debian, Ubuntu is similar to it.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

About adding users from a text file using bash

hello, I try to add users from a text file with this form: username:groupename:homedir first i extract data which is separated by ":" then i use useradd to add users/groups. but,,, my code doesn't works : #!/bin/bash echo "give me a text file: " read dir # control if... (2 Replies)
Discussion started by: ref012
2 Replies

2. Shell Programming and Scripting

Adding users from a txt fille

hello i'm making a bash script for adding users from a txt fille i have a basic script that adds users and their password . when you type the users by hand , now i want to upgrade my script with a txt file of users and their password , but i don't know how to start . my txt file looks... (10 Replies)
Discussion started by: Roggy
10 Replies

3. Windows & DOS: Issues & Discussions

Script for adding users to file permissions

I need a script to add the following two users ids to the permissions for various files: IIS_WPG and IUSR_CowGirl. I am fairly familiar with scripting but haven't been able to figure out how to do this via a script. Manually doing it is slow. I don't want to create users but only add them to a... (2 Replies)
Discussion started by: Stu Loventhal
2 Replies

4. Shell Programming and Scripting

Simple script for adding users

Hi guys, I've a simple linux script (made by my friend), which adds users to the system from userlist file. it also creates user home dir and copies certain files to the directory. To be honest, am a newbie in scripting so am unable to fully understand how the script is working. unfortunately,... (30 Replies)
Discussion started by: vish6251
30 Replies

5. AIX

adding users via smit

I apologize if this is a simple/stupid question. When I add users in smit as root, many(most) of the fields are automatically popluated with some basic default values. Some other admins here have access to create users via sudo, however when they create users (sudo smit users), the user gets... (3 Replies)
Discussion started by: mshilling
3 Replies

6. Shell Programming and Scripting

Adding delimiter to logged in users

Hi guys! Just was wanting to run a command that would allow me to seperate the currently logged in users. Basically from this format: user1 user2 user3 To: user1|user2|user3 (Note the lack of a pipe at the end, not sure if thats possible) Basically it needs to be in this... (11 Replies)
Discussion started by: crawf
11 Replies

7. Programming

reg adding Users into at.allow and removing from at.allow

Hi , Thanks for your time . I am working on a application , which adds unix user through useradd and deletes user through userdel . both are admin commands . My requirement is i have to add a user into at.allow whenver a unix user is added through my application and the user should be... (4 Replies)
Discussion started by: naren_chella
4 Replies

8. UNIX for Dummies Questions & Answers

Adding users to /etc/group

I'm using SAM to add users on an HP and they're adding fine. But in /etc/group it only lists the group names. It's not adding the users in there. Is there a way to have them put in there without going into SAM and modifying the group and adding them? I guess what I want to happen is when I add... (1 Reply)
Discussion started by: golfhakker
1 Replies

9. Shell Programming and Scripting

Adding a backslash to users' input

Hi, I need to convert user-input from '(this)' to '\(this\)' before passing it to egrep. I've tried using TR, SED and NAWK to add the backslash, but the most I ever get is a backslash without a '(' or ')'. Any ideas? Thanks! (13 Replies)
Discussion started by: netguy
13 Replies

10. Shell Programming and Scripting

Adding users

Anyone have a simple shell script that will prompt and accept screen input for each field that is required in the /etc/passwd file? (3 Replies)
Discussion started by: Relykk
3 Replies
Login or Register to Ask a Question