Create New Group/User/Password in S10


 
Thread Tools Search this Thread
Operating Systems Solaris Create New Group/User/Password in S10
# 1  
Old 06-10-2012
Create New Group/User/Password in S10

I have performed the following with lower case group and usernames and the only difference is that the error message under groupadd goes away, yet I am still unable to successfully add a user WITH a home directory.

This is in Solaris 10. I am able to add a group, add a user, add the users password but I am unable to create the users home directory, and hence login using "su - Object" cannot be done. I've already proved that using a lower case group and username is the issue. The following is a script that I ran:

Code:
Script started on Sun Jun 10 19:51:23 2012

#
# /usr/sbin/groupadd -g 1001 Object
UX: groupadd: Object name should be all lower case or numeric.
#
# tail -2 /etc/group
nogroup::65534:
Object::1001:
# 
# useradd -D
group=other,1  project=default,3  basedir=/home  
skel=/etc/skel  shell=/bin/sh  inactive=0  
expire=  auths=  profiles=  roles=  limitpriv=  
defaultpriv=  lock_after_retries=  
# 
# useradd -d /home/Object -g 1001 -m -u 1001 -s /bin/sh Object
cp: /home/Object: Operation not applicable
chown: /home/Object: No such file or directory
# 
# passwd Object
New Password: 
Re-enter new Password: 
passwd: password successfully changed for Object
# 
# tail -2 /etc/passwd
nobody4:x:65534:65534:SunOS 4.x NFS Anonymous Access User:/:
Object:x:1001:1001::/home/Object:/bin/sh
# 
# tail -2 /etc/shadow
nobody4:*LK*:6445::::::
Object:Bns3nXhBf5ju.:15502::::::
# 
# su - Object
su: No directory!
# 
# ls -al /home
total 3
dr-xr-xr-x   1 root     root           1 Jun 10 13:31 .
drwxr-xr-x  39 root     root        1024 Jun 10 18:52 ..
# 
# pwd
/home
# 
# whoami
root
# 
# mkdir /home/Object
mkdir: Failed to make directory "/home/Object"; Operation not applicable
# 
# ls -al /home
total 3
dr-xr-xr-x   1 root     root           1 Jun 10 13:31 .
drwxr-xr-x  39 root     root        1024 Jun 10 18:52 ..
# 
# exit
#
script done on Sun Jun 10 19:56:44 2012

Thanks!

---------- Post updated at 08:26 PM ---------- Previous update was at 08:15 PM ----------

I logged out and tried to log in to the Solaris 10 graphical interface using user Object and the system will not allow the user to log in. It fails when it goes to switch to the desktop.

---------- Post updated at 08:54 PM ---------- Previous update was at 08:26 PM ----------

Well, after poking around on the Internet I figured out how to create the "home" directory for a user so that the user could log in but the directory is not located at

Code:
 /home/<username>

it is located at
Code:
/export/home/<username>

so now Solaris has me wondering what /home is for? Is it just a mount point? Must be....

Thanks in any case!
# 2  
Old 06-11-2012
On Solaris, /export/home is the directory where local users home directories are located and /home is where autofs (automounter), if used, mounts a user's home directory.
This User Gave Thanks to fpmurphy For This Post:
# 3  
Old 06-11-2012
Thanks!

And I wanted to clear up to readers that are following this that the only thing that I did to clear up the issue was to substitute the following line above
Code:
# useradd -d /home/Object -g 1001 -m -u 1001 -s /bin/sh Object

with
Code:
# useradd -d /export/home/Object -g 1001 -m -u 1001 -s /bin/sh Object

Thanks!
# 4  
Old 06-11-2012
As autofs is managing /home by default, just add this line to /etc/auto_home:
Code:
 * localhost:/export/home/&

and you'll be able to access /export/home/username through /home/username and so use the latter as home directory:
Code:
# usermod -d /home/object object

By the way, don't use mixed case or all upercase user/group names. While no strictly prohibited, it is a poor practice that sooner or later will lead to issues.

Last edited by jlliagre; 06-11-2012 at 02:56 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need one line command to create and set password for new user...

Using useradd abc --password password (5 Replies)
Discussion started by: Jagruti Rml
5 Replies

2. Red Hat

User is a Part of a Group But Group Details Do Not Show the User

Hi, In the following output you can see the the user "richard" is a member on the team/group "developers": # id richard uid=10247(richard) gid=100361(developers) groups=100361(developers),10053(testers) but in the following details of the said group (developers), the said user... (3 Replies)
Discussion started by: indiansoil
3 Replies

3. UNIX for Dummies Questions & Answers

How to create a volume group, logical volume group and file system?

hi, I want to create a volume group of 200 GB and then create different file systems on that. please help me out. Its becomes confusing when the PP calculating PP. I don't understand this concept. (2 Replies)
Discussion started by: kamaldev
2 Replies

4. Shell Programming and Scripting

New To UNIX - Need Script to create report of user & group accounts

Hi, I'm new to the world of UNIX and have been asked to create a complex script (at least complex to me:confused:) for AIX UNIX to create a report of all the users on the server including server, user, UID, groups, GID, etc. Found a script using lsuser, but the output is still lacking. 2 things I... (2 Replies)
Discussion started by: panthur
2 Replies

5. UNIX for Dummies Questions & Answers

create new group/delete existing group

Hi, please let me know the commands to create new group/delete existing group in unix and assigning users to newly created group. Thank you in advance. (2 Replies)
Discussion started by: kancherla.sree
2 Replies

6. Ubuntu

Create New User with the same group nd privileges of the other user

Hi, Anyone can help me on how to duplicate privileges and group for useroradb01 to userrootdb01. I have currently using "useroradb01" and create a newly user "userrootdb01". I want both in the sames privileges and group. Please see the existing users list below; drwxr-xr-x 53 useroradb01... (0 Replies)
Discussion started by: fspalero
0 Replies

7. AIX

How to create new user and add group

Hello, I am new in AIX please tell how can i create user and add group in this user for example, i want to create user umair and want to add this user primanry group DBA and secondary group ORACLE,how can i do this please tell in detail Thanks, Umair (1 Reply)
Discussion started by: umair
1 Replies

8. Shell Programming and Scripting

Create new user account and password in shell script

I am trying to create a shell script that will: check if a specific user already exists if not, create a specific group and create the user in that group assign a password to that user, where the password is passed in as a parameter to the script The problem that I need help with is 3 on... (4 Replies)
Discussion started by: killuane
4 Replies

9. UNIX for Dummies Questions & Answers

How to create/restrict a user with to have no privilege from other group

Hello experts I am new to Unix. Env : HPUX I need to create a user say testuser such that it does not have access to file/directories from the other group i.e the last 3 digits . How do I do that. Reason for such a request :- I have an existing user oracle which has default umask... (3 Replies)
Discussion started by: simonsimon
3 Replies
Login or Register to Ask a Question