Link to home
Start Free TrialLog in
Avatar of Jasmin shahrzad
Jasmin shahrzad

asked on

change home login

in centos 8, how to change user login home to customer login?
 i mean somthing like that /home/company/
Avatar of Jasmin shahrzad
Jasmin shahrzad

ASKER

i login add user from ipa (then its not a centos local user) IN IPA I ADD USER LOGIN TO /home/company/user-name
but when i try to login as user :
su: warning: cannot change directory to /home/COMPAY-NAME/USER-NAME: No such file or directory
Avatar of David Favor
Easy way to do this.

1) Create the new home directory.

2) Ensure correct ownership + permissions set on new home directory.

3) Edit /etc/passwd (using the vipw command) to manually set the net home directory.

Note: Best this user be logged out when doing this, to avoid odd behavior.
No David.
This is not i Mean.
I have a ipa_free server install on centos 8. When i Create user from GUI i change Home Directory to home/company/username.
Company folder is exist under Home and have a permission 775.
I can see Ask for user on server with getend and I can su to user.
Then i get error  company_name not such a file or Directory
I think the clue here might be company_name which seems related to IPA (maybe) rather than actual Linux level user data.
According to doc at the end should say :
Ipa config-mod -- defaultshell=/bin/bash
Then it return
....
....
Home Directory base: /home
...
....
If the basename is /home then   home/company.user  probably is  /home/home/company/user....

You probably need to stick to either absolute pathnames (starting with /) or modyfy the default to  /home/companyname and tack on the default username, or use companyname/username  for each user (might be handy with multi-tennants setup).
ASKER CERTIFIED SOLUTION
Avatar of Jasmin shahrzad
Jasmin shahrzad

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial