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 added to /etc/passwd but the rest of the user creation process fails. When we go look at that users characteristics, only the username is filled in and the rest of the fields are blank.
Is there something I am missing or can I not have this functionality via sudo?
Thanks in advance
---------- Post updated at 09:39 AM ---------- Previous update was at 09:31 AM ----------
to expand on this a litte, if I could give them a script that would create users via command line I would gladly go that route. Every script I have tried including starting from pressing F6 during user creation and working from that fails in the same way. It appears to work but when I look at the characteristics of the user, most fields in smit are blank.
This is just a test, as you can adjust your script to ask all the important questions instead of hard coding these after you get things working.
Create a shell script that just calls mkuser and has all the values hard coded in it. Of course change all the values in the code below to the correct ones. If you want more values set for this user than what I have included below then adjust as needed.
Give the admin access to this shell script through sudo. The will run the mkuser command with root authority.
Now what values are missing for this new user that you expect to be there?
Just my two cents on how I would troubleshoot this as there are lots of other ways.
If you don't like this process then that's your choice.
I did add "smitty user" in my sudo file and ran it as a non root user and it populated all the fields just as if I run it as root. So if you have it set up the same way then maybe it's some sort of sudo bug.
No, I do like that process and will look into all the values that are set.
Quote:
I did add "smitty user" in my sudo file and ran it as a non root user and it populated all the fields just as if I run it as root. So if you have it set up the same way then maybe it's some sort of sudo bug.
When you did this, did you see the process through to the end then go back and look at the created user? The reason I ask is this. When I do that, it appears as all the values are set. I type in the username and press enter, then when I look at the created user, its missing everything except the username. Just curious more than anything.
I did follow through with the "smitty user" process and it all looks good compared to a user added using the root id. I filled in the follow fields and only those fields and left the others either blank or at the default.
User Name
Primary group
Group SET
Initial Program
User Info
Below are the results of
run against both ids.
User created with my id using sudo.
Id created using the root id.
Last edited by juredd1; 04-29-2011 at 02:31 PM..
Reason: Fix Syntax
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)
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)
Hi,
I'm newbee to AIX and would like to setup a process which kills 1 Hr. ideal users from smit. Please advise for making it work. :)
Thanks,
Sumit (2 Replies)
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... (4 Replies)
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)
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)
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)
Hi every one,
I recently installed Suse 9.1 and added two users during installation with out problems.
I have tried to add another user using the following cmd: 'useradd pite' and 'passwd xxxx' and got a message new user and password added.
But when i tried to create a directory using... (3 Replies)
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)